package coo.taomu.toolkit.test

import com.google.common.eventbus.Subscribe
import cool.taomu.toolkit.Taomu
import cool.taomu.toolkit.watcher.entity.FileCreateEvent
import cool.taomu.toolkit.watcher.entity.FileDeleteEvent
import cool.taomu.toolkit.watcher.entity.FileModifyEvent

class FileEventListener {

    @Subscribe
    def void onFileCreated(FileCreateEvent event) {
        System.out.println("[Listener1] 文件创建: " + event.getFile());
    }

    @Subscribe
    def void onFileModified(FileModifyEvent event) {
        System.out.println("[Listener1] 文件修改: " + event.getFile());
    }

    @Subscribe
    def void onFileDeleted(FileDeleteEvent event) {
        System.out.println("[Listener1] 文件删除: " + event.getFile());
    }
    
    def static void main(String[] args){
        Taomu.run()
    }
}
